package com.sx.entity.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sx.basic.BasicEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

/**
 * @author AdinZ
 * @date 2020/11/7 10:13
 */
@Data
@NoArgsConstructor
@TableName(value = "sx_user")
@Entity @Table(name = "sx_user")
@ApiModel(value = "用户表",description = "用户表")
public class UserEntity  extends BasicEntity {

    @ApiModelProperty("用户id")
    @Id @GeneratedValue
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    @ApiModelProperty("登陆名称")
    @Column(length = 20)
    private String username;
    @ApiModelProperty("用户昵称")
    private String nickname;
    @ApiModelProperty("用户头像")
    private String avatar;
    @ApiModelProperty("登陆密码")
    private String password;
    @ApiModelProperty("支付密码")
    private String payPwd;
    @ApiModelProperty("手机号")
    private String phone;
    @ApiModelProperty(value = "状态",allowableValues = "[1(正常),0(禁用)]")
    private int state=1;
    @ApiModelProperty("创建时间")
    private long created=System.currentTimeMillis();
    @ApiModelProperty("邀请人id")
    private Long inviteUid;



}
